﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace BillGuru.UI
{
    internal class PermissionHandler
    {
        internal static bool checkDataLoss(FormClosingEventArgs e)
        {
            Debug.Assert(e != null, "e is null.");

            DialogResult result = MessageBox.Show("Changes will be lost, Continue?", "Loss of Data", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);

            if (result == DialogResult.No)
            {
                e.Cancel = true;
                return true;
            }

            return false;

        }

    }
}
